def hex2gb2312(hex_input):
    if hex_input == 'Unknown' or hex_input == 'Unkown' or hex_input == '':
        return 'Unknown'
    hex_input=hex_input
    try:
        utf8_output = hex_input.decode('hex')
        gb2312_output = utf8_output.decode('gb2312')
        return gb2312_output
    except (UnicodeDecodeError,TypeError), e:
        print e
        return 'UnicodeDecodeError'
    else:
